'\" t
.TH samtools-quickcheck 1 "14 July 2025" "samtools-1.22.1" "Bioinformatics tools"
.SH NAME
samtools quickcheck \- a rapid sanity check on input files
.\"
.\" Copyright (C) 2008-2011, 2013-2018 Genome Research Ltd.
.\" Portions copyright (C) 2010, 2011 Broad Institute.
.\"
.\" Author: Heng Li <lh3@sanger.ac.uk>
.\" Author: Joshua C. Randall <jcrandall@alum.mit.edu>
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a
.\" copy of this software and associated documentation files (the "Software"),
.\" to deal in the Software without restriction, including without limitation
.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
.\" and/or sell copies of the Software, and to permit persons to whom the
.\" Software is furnished to do so, subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
.\" DEALINGS IN THE SOFTWARE.
.
.\" For code blocks and examples (cf groff's Ultrix-specific man macros)
.de EX

.  in +\\$1
.  nf
.  ft CR
..
.de EE
.  ft
.  fi
.  in

..
.
.SH SYNOPSIS
.PP
samtools quickcheck
.RI [ options ]
.IR in.sam | in.bam | in.cram
[ ... ]

.SH DESCRIPTION
.PP
Quickly check that input files appear to be intact. Checks that beginning of the
file contains a valid header (all formats) containing at least one target
sequence and then seeks to the end of the file and checks that an end-of-file
(EOF) is present and intact (BAM and CRAM only).

Data in the middle of the file is not read since that would be much more time
consuming, so please note that this command will not detect internal corruption,
but is useful for testing that files are not truncated before performing more
intensive tasks on them.

This command will exit with a non-zero exit code if any input files don't have a
valid header or are missing an EOF block. Otherwise it will exit successfully
(with a zero exit code).

.SH OPTIONS
.TP 8
.B -v
Verbose output: will additionally print the names of all input files that don't
pass the check to stdout. Multiple -v options will cause additional messages
regarding check results to be printed to stderr.
.TP 8
.B -q
Quiet mode: disables warning messages on stderr about files that fail.
If both -q and -v options are used then the appropriate level of -v takes precedence.
.TP
.B -u
Expect unmapped input data, so do not require targets in the header.

.SH AUTHOR
.PP
Written by Josh Randall from the Sanger Institute.

.SH SEE ALSO
.IR samtools (1)
.PP
Samtools website: <http://www.htslib.org/>
